From: Eli Zaretskii Date: Sat, 8 Mar 2025 09:31:22 +0000 (+0200) Subject: Fix crash in daemon when "C-x C-c" while a client frame shows tooltip X-Git-Tag: archive/raspbian/1%30.2+1-2+rpi1^2~2^2~24^2~218 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=b1a9a4a48e24fd69cf94338d83b221698ba8af11;p=emacs.git Fix crash in daemon when "C-x C-c" while a client frame shows tooltip * src/frame.c (delete_frame): Ignore tooltip frames when looking for other frames on the same terminal. (Bug#76842) (cherry picked from commit d2445c8c23595efdd444fce6f0c33ba66b596812) --- diff --git a/src/frame.c b/src/frame.c index b21ff73c9ef..d0446279db7 100644 --- a/src/frame.c +++ b/src/frame.c @@ -2410,17 +2410,19 @@ delete_frame (Lisp_Object frame, Lisp_Object force) struct frame *f1 = XFRAME (frame1); /* Set frame_on_same_kboard to frame1 if it is on the same - keyboard. Set frame_with_minibuf to frame1 if it also - has a minibuffer. Leave the loop immediately if frame1 - is also minibuffer-only. + keyboard and is not a tooltip frame. Set + frame_with_minibuf to frame1 if it also has a minibuffer. + Leave the loop immediately if frame1 is also + minibuffer-only. - Emacs 26 does _not_ set frame_on_same_kboard here when it - finds a minibuffer-only frame and subsequently fails to + Emacs 26 did _not_ set frame_on_same_kboard here when it + found a minibuffer-only frame, and subsequently failed to set default_minibuffer_frame below. Not a great deal and - never noticed since make_frame_without_minibuffer creates - a new minibuffer frame in that case (which can be a minor - annoyance though). To consider for Emacs 26.3. */ - if (kb == FRAME_KBOARD (f1)) + never noticed since make_frame_without_minibuffer created a + new minibuffer frame in that case (which can be a minor + annoyance though). */ + if (!FRAME_TOOLTIP_P (f1) + && kb == FRAME_KBOARD (f1)) { frame_on_same_kboard = frame1; if (FRAME_HAS_MINIBUF_P (f1))